var path = require("path");
var htmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
    entry:path.join(__dirname,"./src/main.js"),
    output:{
        path:path.join(__dirname,"./dist/"),
        filename:"bundle.js"
    },
   module:{
       rules:[
           {test:/\.css$/,use:["style-loader","css-loader"]},
           {test:/\.(jpg|png|gif|ttf)$/,use:["url-loader"]},
           {test:/\.vue$/,use:["vue-loader"]},
           {test:/\.js$/,use:["babel-loader"],exclude:/node_modules/},
           {test:/\.less$/,use:["style-loader","css-loader","less-loader"]}
        ]
   },

    plugins:[
        new htmlWebpackPlugin({
            template:"./src/index.html",
            filename:"index.html",
        })
    ]
}